import request from '@/utils/request'

// 查询房源管理列表
export function listHousingresources(query) {
  return request({
    url: '/housingresources/housingresources/list',
    method: 'get',
    params: query
  })
}

// 查询房源管理详细
export function getHousingresources(id) {
  return request({
    url: '/housingresources/housingresources/' + id,
    method: 'get'
  })
}

// 新增房源管理
export function addHousingresources(data) {
  return request({
    url: '/housingresources/housingresources',
    method: 'post',
    data: data
  })
}

// 修改房源管理
export function updateHousingresources(data) {
  return request({
    url: '/housingresources/housingresources',
    method: 'put',
    data: data
  })
}

// 删除房源管理
export function delHousingresources(id) {
  return request({
    url: '/housingresources/housingresources/' + id,
    method: 'delete'
  })
}

// 导出房源管理
export function exportHousingresources(query) {
  return request({
    url: '/housingresources/housingresources/export',
    method: 'get',
    params: query
  })
}

// 查询楼宇下拉树结构
export function treeselect() {
  return request({
    url: '/project/project/buildingTree',
    method: 'get'
  })
}


// 导入楼宇管理
export function importTemplate() {
  return request({
    url: '/housingresources/housingresources/importTemplate',
    method: 'get',
  })
}


//获取楼层列表
export  function getFloorList(buildingId) {
  return request({
    url: '/building/building/getFloorList/'+buildingId,
    method: 'get',
  })
}
